<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>File uploader</title>
   
    <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
    
 </head>
    <body>
  File Uploader
<form enctype="multipart/form-data" action="uploader.html" method="POST"> 
<input type="hidden" name="MAX_FILE_SIZE" value="100000" /> 
Choose a file to upload: <input name="uploadedfile" type="file" /><br/> 

<input type="submit" value="Upload File" /> 
</form> 
<?php 
  $to_file = "tmp/" . basename($_FILES['uploadedfile']['name']); 
  $from_file = $_FILES['uploadedfile']['tmp_name']; 
  if (move_uploaded_file($from_file, $to_file)) { 
    echo "Successful upload"; 
?> 
  <a href="<?php echo $to_file;?>"><?php echo $to_file;?></a> 
<?php 
  } else { 
    echo "Unsuccessful upload"; 
  } 
?> 
 </body>
</html>
